package com.artPreter.mapper;

import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.toolkit.Constants;
import com.artPreter.pojo.Position;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.artPreter.pojo.other.statistics.AlertMessageNum;
import com.artPreter.pojo.other.statistics.TypeNumber;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
 * <p>
 * 位置表 Mapper 接口
 * </p>
 *
 * @author Jarvis_He
 * @since 2024-04-22
 */
@Mapper
public interface PositionMapper extends BaseMapper<Position> {

    @Select("select type as type, count(*) as num from jv_alert_message ${ew.customSqlSegment} group by type ")
    List<TypeNumber> getDevicesTypeAlertMessageStatistics(@Param(Constants.WRAPPER) Wrapper wrapper);
}
